package band.wukong.practice.webservice.kh.sample05;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.util.List;

/**
 * @author wukong(wukonggg@139.com)
 */
@WebService(
//    targetNamespace = "http://www.wukong.band/wkp/webservice/kh/sample05"
//    default targetNamespace（default的话就不用写）:
//    targetNamespace = "http://sample05.ch03.kh.webservice.practice.wukong.band/"
)
public interface JukeboxService {

    @WebResult(name="result-randomArtist")
    String randomArtist(@WebParam(name="genre") int genre);

    @WebResult(name = "artist")
    Artist addArtist(@WebParam(name = "id") String id, @WebParam(name = "name") String name);

    @WebResult(name = "artist")
    List<Artist> listArtists();

    @WebResult(name = "artist")
    void updateArtist(@WebParam(name = "artist") Artist artist,
                      @WebParam(name = "authInfo", header = true) String authInfo);

    @WebResult(name = "artist")
    void removeArtist(@WebParam(name = "artist") Artist artist) throws JukeboxException;

}
